using System;
using System.Collections.Generic;
using System.Reflection;

namespace Charisma.Conventions
{
    public class PublicFieldConvention : IFieldConvention
    {
        #region IFieldConvention Members

        public IEnumerable<FieldInfo> Find(Type type)
        {
            FieldInfo[] candidates =
                type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly);
            return candidates;
        }

        #endregion
    }
}